﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using WorkerService.ConfigModel;

namespace WorkerService.Common
{
    public class Settings
    {
        public string Host { get; set; }

        public string User { get; set; }

        public ConfigOne configOne { get; set; }
        public ConfigTwo configTwo { get; set; }
        public Platform Platform
        {
            get
            {
                if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
                {
                    return Platform.Windows;
                }

                if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
                {
                    return Platform.Linux;
                }

                throw new PlatformNotSupportedException(
                    "Only works on Windows or Linux.");
            }
        }
    }
    public enum Platform
    {
        Linux,
        Windows
    }
}
